import OnlyRouter from '@/layout/OnlyRouter'
//顺便做menu
const router = [
  {
    path:'/AutoSC/IndexPage',
    name:'IndexPage',
    component:() => import('@/views/autoSCIndex/index'),
    meta:{
      title:'首页',
      menuShow:false,
    }
  },
  {
    path:'/AutoSC/DataPreparation',
    name:'DataPreparation',
    component:OnlyRouter,
    meta:{
      title:'数据准备',
      menuShow:true,
    },
    children:[
      {
        path: 'messageManager',
        name: 'messageManager',
        component: () => import('@/views/autoSCMain/DataPreparation/messageManager'),
        meta:{
          title: '报文组管理',//
          menuShow:true,
          fatherName:'DataPreparation',
        }
      },
      {
        path: 'sampleManager',
        name: 'sampleManager',
        component: () => import('@/views/autoSCMain/DataPreparation/sampleManager'),
        meta:{
          title: '样本管理',
          menuShow:true,
          fatherName:'DataPreparation',
        }
      },
    ],
  },
  {
    path:'/AutoSC/AnalysisBatch',
    name:'AnalysisBatch',
    component:OnlyRouter,
    meta:{
      title:'可视化分析',
      menuShow:true,
    },
    children:[
      {
        path: 'statisticAnalysis',
        name: 'statisticAnalysis',
        component: () => import('@/views/autoSCMain/AnalysisBatch/tjfx'),
        meta:{
          title: '统计分析',
          menuShow:true,
          fatherName:'AnalysisBatch',
        }
      },
      {
        path: 'variablesAssociated',
        name: 'variablesAssociated',
        component: () => import('@/views/autoSCMain/AnalysisBatch/blgl'),
        meta:{
          title: '变量关联',
          menuShow:true,
          fatherName:'AnalysisBatch',
        }
      },
      {
        path: 'variableEvaluation',
        name: 'variableEvaluation',
        component: () => import('@/views/autoSCMain/AnalysisBatch/blpj'),
        meta:{
          title: '变量评价',
          menuShow:true,
          fatherName:'AnalysisBatch',
        }
      }, 
    ]
  },
  {
    path:'/AutoSC/Modeling',
    name:'Modeling',
    component: OnlyRouter,
    meta:{
      title:'自动建模',
      menuShow:true,
    },
    children:[
      {
        path: 'AutoSC',
        name: 'AutoSC',
        component: () => import('@/views/autoSCMain/Modeling/index'),
        meta:{
          title: 'AutoSC',
          menuShow:true,
          fatherName:'Modeling',
        },
        props:({query:{modeid},name:modename})=>{
          return { modeid,modename }
        }
      },{
        path: 'AutoTR',
        name: 'AutoTR',
        component: () => import('@/views/autoSCMain/Modeling/index'),
        meta:{
          title: 'AutoTR',
          menuShow:true,
          fatherName:'Modeling',
        },
        props:({query:{modeid},name:modename})=>{
          return { modeid,modename }
        }
      },{
        path: 'AutoML',
        name: 'AutoML',
        component: () => import('@/views/autoSCMain/Modeling/index'),
        meta:{
          title: 'AutoML',
          menuShow:true,
          fatherName:'Modeling',
        },
        props:({query:{modeid},name:modename})=>{
          return { modeid,modename }
        }
      },{
        path: 'AutoGAM',
        name: 'AutoGAM',
        component: () => import('@/views/autoSCMain/Modeling/index'),
        meta:{
          title: 'AutoGAM',
          menuShow:true,
          fatherName:'Modeling',
        },
        props:({query:{modeid},name:modename})=>{
          return { modeid,modename }
        }
      }
    ]
  },
  {
    path:'/AutoSC/ModelManage',
    name:'ModelManage',
    component:OnlyRouter,
    meta:{
      title:'模型管理',
      menuShow:true,
    },
    children:[
      {
        path: 'modelManager',
        name: 'modelManager',
        component: () => import('@/views/autoSCMain/ModelManage/modelManager'),
        meta:{
          title: '模型管理',
          menuShow:true,
          fatherName:'ModelManage',
        }
      }
    ]
  },
  {
    path: '/AutoSC/CreditReports',
    name: 'CreditReports',
    component:OnlyRouter,
    meta:{
      title: '辅助决策',
      menuShow:true,
    },
    children:[
      {
        path: 'aidDecisionMaking',
        name: 'aidDecisionMaking',
        component: () => import('@/views/autoSCMain/CreditReports/aidDecisionMaking'),
        meta:{
          title: '辅助决策',
          menuShow:true,
          fatherName:'CreditReports',
        }
      }
    ]
  },
  {
    path:'personalCenter',
    name:'personalCenter',
    component: () => import('@/views/user/personalCenter'),
    meta:{
      title: '个人中心',
      menuShow:false,
    },
  }
]

export const autoSCMain = router
// .map(e=>{
//   if(e.children){
//     const fatherName = e.name
//     e.children.forEach(i=>{
//       i.meta = {fatherName}
//       console.log(i)
//     })
//   }
// })
